package com.member.shop.domain;

import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.member.common.annotation.Excel;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.experimental.SuperBuilder;
import com.member.common.core.domain.BaseEntity;

/**
 * 核销对象 sys_biz_write_off
 *
 * @author lixinchen
 * @date 2024-11-05
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_write_off")
public class SysBizWriteOff extends BaseEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 核销id
     */
    @TableId(type = IdType.AUTO)
    private Long id;


    /**
     * 归属经销商id
     */
    @Excel(name = "归属经销商id")
    private Long belongDealerId;


    /**
     * 归属店铺id
     */
    @Excel(name = "归属店铺id")
    private Long belongShopId;


    /**
     * 核销业务员
     */
    @Excel(name = "核销业务员")
    private Long writeOffUserId;




    /**
     * 核销码
     */
    @Excel(name = "核销码")
    private String writeOffCode;

    /**
     * 核销类型（0：优惠券 1：积分订单 2：奖品）
     */
    @Excel(name = "核销类型", readConverterExp = "0：优惠券,1：积分订单,2：奖品")
    private Integer writeOffType;
    @TableField(exist = false)
    private SysBizRaffleResults raffleResults;

    @TableField(exist = false)
    private SysBizCouponReceive coupon;
    /**
     * 核销时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "核销时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime writeOffTime;

    /**
     * 核销业务id（优惠券 积分 奖品id
     */
    @Excel(name = "核销业务id", readConverterExp = "核销业务id（优惠券 积分 奖品id")
    private Long bussId;

    /**
     * 核销状态（0：未核销：1：已核销 2：核销失败）
     */
    @Excel(name = "核销状态", readConverterExp = "0：未核销：1：已核销,2：核销失败")
    private Integer writeOffStatus;
    /**
     * 核销年
     */
    @Excel(name = "核销年")
    private Integer writeOffYear;
    /**
     * 核销月
     */
    @Excel(name = "核销月")
    private Integer writeOffMonth;
}
